package com.cskaoyan.javase.basic._2variable._3notice;

/**
 * 小练习
 * @since 16:03
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo5 {
    public static void main(String[] args) {
        // 字符型只有在参与数值运算时,才是编码值参与运算,其他的比如输出,比如拼接字符串都是字符参与运算
        System.out.println('a'); // a
        System.out.println('a' + 1); // 98
        System.out.println("hello" + 'a' + 1); // helloa1
        System.out.println('a' + 1 + "hello"); // 98hello
        System.out.println("5 + 5 = " + 5 + 5); // 5 + 5 = 55
        System.out.println(5 + 5 + " = 5 + 5"); // 10 = 5 + 5
        System.out.println(5 + 5.0); // 10.0
        System.out.println(5 + "5" + 5.0); // 555.0

        System.out.println("-------------------------");
        byte b1 = 1, b2 = 2, b;
        int num = b1 + b2;
        // char c = b1 + b2;
        // 11个1已经超过了int的取值范围 Integer number too large
        long d = 1111333333333331L;

        byte b3 = (byte) 130;
    }
}
